package com.wcy.controller;

import com.wcy.entity.Role;
import com.wcy.service.IUserRoleService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @since 2021-04-30
 */
@RestController
@RequestMapping("/userRole")
public class UserRoleController {

    @Autowired
    IUserRoleService userRoleService;

    @RequestMapping("list")
    public PageInfo<Role> list(String persons, @RequestParam(defaultValue = "1") int pageNum, @RequestParam(defaultValue = "3")int pageSize){
       PageInfo<Role> userRoleList = userRoleService.queryAll(persons,pageNum,pageSize);
       return userRoleList;
    }

}

